export const calculateFoodStatus = (expiryDate, baseDate = new Date()) => {
  const today = new Date(baseDate);
  const expire = new Date(expiryDate);
  const diffDays = (expire - today) / (1000 * 60 * 60 * 24);
  if (diffDays < 0) return 1; // 已过期
  if (diffDays <= 3) return 2; // 临期
  return 0; // 新鲜
};
